/*
 * @Author: Haochen
 * @Date: 2021-12-13 15:39:36
 * @LastEditTime: 2021-12-24 14:39:14
 * @FilePath: \recipes-admin-system\src\api\modules\admins.js
 */
import axios from 'axios';

export default {
  login(data) {
    return axios({
      url: '/admin/login',
      method: 'POST',
      data,
    });
  },

  getAllAdmins() {
    return axios({
      url: '/admin/getAllAdmins',
      method: 'GET',
    });
  },

  addAdmin(data) {
    return axios({
      url: '/admin/addAdmins',
      method: 'POST',
      data,
    });
  },

  deleteAdmin(data) {
    return axios({
      url: '/admin/delAdmins',
      method: 'POST',
      data,
    });
  },
};
